package com.feng.zhihao.apigeteway.util;

import java.io.File;
import java.util.Map;

import org.springframework.boot.SpringApplication;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.xiaoleilu.hutool.io.FileUtil;
import com.xiaoleilu.hutool.util.XmlUtil;

public class XMLUtils {
	public static Map<?, ?> parseXmlToMap(String xml){
		Document document = XmlUtil.parseXml(xml);
		JSONObject json=new JSONObject();
		Element element = document.getDocumentElement();
//		element.
		return null;
	}
	public static void main(String[] args) {
		System.out.print(JSON.toJSONString(parseXmlToMap(FileUtil.readString(new File("C:/Users/fengz/Desktop/xx.xml"), "UTF-8")), true));
	}
}
